import pymysql


class DataSource:

    def __init__(self,config:dict):
        self.conn=pymysql.connect(
            user=config['user'],
            password=str(config['password']),
            host=config['host'],
            port=config['port'],
            database=config['database'],
            charset=config['charset'],
            autocommit=config['autocommit']
        )
